package com.softa.common.sysconfig.mybatis.entity;



import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.util.Date;

/**
 * 
 * Add "created_date" "created_by" "modified_date" "modified_by" fields to
 * tables.
 * @author hasee
 */
@Data
public abstract class AbstractAuditingAwareEntity extends AbstractOptimisticLockSupportedEntity {

	@TableField(value="created_date",strategy= FieldStrategy.NOT_NULL,fill= FieldFill.INSERT)
	protected Date createdDate;

	@TableField(value="created_by",strategy=FieldStrategy.NOT_NULL,fill=FieldFill.INSERT)
	protected String createdBy;

	@TableField(value="modified_date",strategy=FieldStrategy.IGNORED,fill=FieldFill.INSERT_UPDATE)
	protected Date modifiedDate;

	@TableField(value="modified_by",strategy=FieldStrategy.IGNORED,fill=FieldFill.INSERT_UPDATE)
	protected String modifiedBy;

}
